1. Field of the Invention
The present invention relates generally to an inter-processor communication system in which an event occurring by detecting, for example, a piece of input data is processed in coaction of a pair of processors respectively having a particular event processing function for processing the event, and more particularly to an inter-processor communication system in which processed results of events are sequentially transmitted from an executed processor to a requesting processor through a message communication means while synchronizing the processing of the events and the transmission of the processed results in the processors at real time. Also, the present invention relates generally to a multi-processor real time system in which a plurality of events are sequentially processed at real time among a plurality of processors while controlling the execution and halt of event processing programs executed in executed processors, and more particularly to a multi-processor real time system in which a plurality of events are sequentially processed at real time among a plurality of processors according to a request and response type communication by the application of the inter-processor communication system.
2. Description of the Related Art
A plurality of events are conventionally processed one after another by executing various event processing programs stored in a single processor such as a micro processor according to a centralized control method. However, because a processor technique has been recently developed, a plurality of events are processed by executing various event processing programs stored in a plurality of processors of a multi-processor system according to a distributed processing method. Therefore, the processing performance such as load distribution and trouble resistance is enhanced by the application of the multi-processor system because the processing of the events are shared among the processors.
The multi-processor system is generally composed of a plurality of servers and a client. Each of the servers is defined as a comparatively small scale processing program and a particular circuit performing a single particular function which is operated by the execution of the processing program. For example, an external storing device or a printer is operated by executing a processing program of a server. Also, the client is defined as a comparatively large scale processing program to perform a high-level function while utilizing one or more processed results obtained in the servers. Therefore, a complicated control is required to execute the processing program of the client.
The concept of the multi-processor system having the servers and the client has generally no direct relation to the number of processors. Therefore, the multi-processor system is not required to have a plurality of processors. The number of processors in the multi-processor system is mostly determined according to the scale of functions required of the multi-processor system. However, though an event is sometimes processed in a single processor, the event is usually processed in coaction of a plurality of processors because a load distribution and a function distribution are considered. Therefore, the client and the servers are respectively placed in a processor.
In cases where an event is processed in the client while utilizing a result of the event processed in one or more servers, procedures for utilizing functions of the servers in the client become the same regardless of the number of processors in which the processing program of the client and the processing programs of the servers are executed on condition that calling programs utilized for calling the servers are programmed in the same type as a subroutine call included in the processing program of the client. Therefore, even though the number of processors is required to be changed because the size of the multi-processor system is altered, the alteration of the client itself is not required. That is, the configurations of the processors can be easily altered without alterring the client.
Therefore, in cases where the client and a server are operated in a plurality of processors, a subroutine call is executed by the client to utilize the function of the server as a service. Thereafter, a request message is sent from the client to the server to request the service of the server, and the client is set to a ready state. Thereafter, the service is executed and completed in the server. Thereafter, a response is sent from the server to the client to inform the completion of the service, and the completion of the service executed in the server is confirmed in the client. Therefore, the client is again set to an operating state to process an event processed in the server. The conventional procedure described above is called a request and response type inter-processor communication method.
2.1. Previously Proposed Art
The inter-processor communication method conventionally performed is described in detail with reference to FIG. 1.
FIG. 1 is a functional block diagram of a conventional multi-processor real time system in which a request and response type procedure is performed among three processors according to the inter-processor communication method.
As shown in FIG. 1, a conventional multi-processor real time system 11 is composed of a first processor 12 functioning as a first task executing means to execute a processing program of a client, a second processor 13 functioning as a second task executing means to execute a processing program of a first server, a third processor 14 functioning as a third task executing means to execute a processing program of a second server, and an inter-processor communication means 15 through which messages such as an indication message, a request message and a response message are transferred to perform a message communication among the processors 12, 13 and 14.
The first processor 12 is composed of a client executing means 16 for executing the client as the first task executing means, a client mail box means 17 at which a message addressed to the client executing means 16 is mailed to execute the means 16, a received message distribution means 18 for selectively receiving messages addressed to the processor 12, classifying the messages into a type of indication message, a type of request message and a type of response message, and mailing the messages at corresponding regions of the client mail box means 17 according to the types of the messages classified, a task halting means 19 for halting the execution of the client executing means 16 until a response message is sent from the client mail box means 17 to the client executing means 16, and a task restarting means 20 for restarting the execution of the client executing means 16 when the response message sent from the first or second server is received in the received message distribution means 18.
The second processor 13 is composed of a server executing means 21 for executing the first server as the second task executing means, a server mail box means 22 at which a message addressed to the server executing means 21 is mailed to execute the means 21, and a received message distribution means 23 for selectively receiving messages addressed to the processor 13, classifying the messages into a type of indication message, a type of response message and a type of request message, and mailing the messages at corresponding regions of the server mail box means 22 according to the types of the messages classified. The third processor 14 is composed of a server executing means 24, a server mail box means 25 and a received message distribution means 26 in the same manner as the second processor 13.
A conventional inter-processor communication system is composed of the first processor 12, the second or third processor 13 or 14 and the inter-processor communication means 15.
In the above configuration, a request message is sent from the client executing means 16 to the server executing means 21 or 24 to start the operation for processing an event in the means 21 or 24, and a response message is sent from the server executing means 21 or 24 to the client executing means 16. The operation for processing the event in the client executing means 16 is halted until the response message is received in the means 16.
In detail, a request type of client message is sent from the client executing means 16 to the second processor 13 through the inter-processor communication means 15 to request a service for processing an event. At this time, a reading operation of the client executing means 16 for reading a message from the client mail box means 17 is stopped by the function of the task halting means 19.
Thereafter, the request type of client message addressed to the second processor 13 is received in the message distribution means 23 and is classified. Thereafter, the request type of client message classified is mailed at the server mail box means 22. When the request type of client message is mailed at the means 22, the operation of the server executing means 21 is started, and the service requested by the request type of client message is performed. That is, the event is processed. After the service is completed, a response type of server message denoting a processed result of the event is directly sent from the server executing means 21 to the received message distribution means 18 of the first processor 12 through the inter-processor communication means 15. Also, an indication type of server massage or a request type of server message is sometimes sent from the server executing means 21 to the received message distribution means 18 regardless of the service.
When the server message is sent to the received message distribution means 18, the operation of the means 18 is started. That is, the server message is confirmed to be addressed to the client executing means 16, and the type of the server message is confirmed. Thereafter, in cases where the server message is a response type, the server message is stored at a head region of the client mail box means 17 pointed by a head pointer 17a to process the response type of server message in the client executing means 16 prior to other indication or request type of server messages stored in the client mail box means 17. In contrast, in cases where the server message is an indication or request type, the indication or request type of server message is stored at a tail region of the client mail box means 17 to process the indication or request type of server message in the client executing means 16 subsequent to other messages stored in the client mail box means 17.
Also, when the server message is sent to the received message distribution means 18, the operation of the task restarting means 20 is started by the function of the means 18. Therefore, a task restarting instruction is sent from the task restarting means 20 to the client executing means 16 of which the reading operation is stopped, so that the means 16 is informed to restart the reading operation. Thereafter, because the reading operation of the client executing means 16 is restarted, the response message stored at the head region of the client mailed box means 17 is read by the means 16. Therefore, the completion of the service requested to the second processor 13 is immediately confirmed, and the response message is processed in the client executing means 16. Thereafter, the other messages subsequent to the response message are read from the client mailed box means 17 one after another, and the other messages are processed.
In the procedure described above, the processing of the event is performed between the first and second processors 12, 13. However, the processing of the event is performed between the first and third processors 12, 14 in the same manner. In this case, the request message sent from the client executing means 16 is addressed to the third processor 14.
Accordingly, even though three types of messages are sent among the processors 12 to 14 through the inner-processor communication means 15, the response message returned from the processor 13 or 14 can be immediately received and processed in the client executing means 16 of the first processor 12 at a top priority.
2.2. Problems to be Solved by the Invention
In cases where a plurality of request messages are sent from the client executing means 16 to the second (or third) processor 13 (or 14) one after another to request a plurality of services, a first task restarting instruction is sent to the client executing means 16 when a first response message is received in the received message distribution means 18, and the operation of the client executing means 16 is restarted to perform a first processing of the first response message. Thereafter, when a second response message is received in the received message distribution means 18, a second task restarting instruction is sent to the client executing means 16, and the operation of the client executing means 16 is again restarted to perform a second processing of the second response message.
However, in cases where the second response message is received in the received message distribution means 18 during the first processing performed in the client executing means 16, the second task restarting instruction is disregarded by the means 16. Therefore, even though the client executing means 16 is set to a waiting state to receive the second task restarting instruction after the first processing is completed in the means 16, the operation of the client executing means 16 is not again restarted to perform the second processing because any more task restarting instruction is not sent to the client executing means 16.
Accordingly, there is a drawback that the second processing relating to the second response message cannot be performed. In other words, a plurality of services cannot be successively performed according to a request and response type inter-processor communication method in which a server requested a service by a client responds the service to the client. For example, even though a plurality of request and response type procedures are successively required for the confirmation of a series of initialization operations, the confirmation of the initialization operations cannot be successively performed, so that the request and response type inter-processor communication method cannot be sufficiently performed in the conventional multi-processor real time system 11 or the conventional inter-processor communication system.